package j02this;

class Dog{
    int age = 3;



    public void say(){
        int age = 100;
        System.out.println("小狗的年龄是："+age);//100
        System.out.println("小狗的this.年龄是："+this.age);//3

        System.out.println("====");
        this.cry();

        System.out.println("this = " + this);
    }

    public void cry(){
        System.out.println("dog begin cry");
    }

    public void thisTest(){
        System.out.println(this);
    }
}

public class J1this {
    public static void main(String[] args) {
        Dog d1 = new Dog();
        d1.say();

        System.out.println("d1 = " + d1);

        System.out.println("====22222====");
        Dog d2 = new Dog();
        d2.thisTest();
        d1.thisTest();

    }
}
